﻿namespace Ops.Host.Core.Entity;

/// <summary>
/// 打标数据
/// </summary>
[SugarTable("pt_marking_data", "打标数据")]
public sealed class PtMarkingData
{
    /// <summary>
    /// 主键，自增长。
    /// </summary>
    [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
    public int Id { get; set; }

    /// <summary>
    /// 打标条码
    /// </summary>
    [DisplayName("SN")]
    [Required, MaxLength(64)]
    [NotNull]
    public string? SN { get; set; }

    /// <summary>
    /// 产品类型
    /// </summary>
    [SugarColumn(ColumnName = "product_type")]
    [DisplayName("车型")]
    [MaxLength(64)]
    public string? ProductType { get; set; }

    /// <summary>
    /// 打标机编号
    /// </summary>
    [SugarColumn(ColumnName = "marker_no")]
    [DisplayName("打标机编号")]
    [MaxLength(32)]
    public string? MarkerNo { get; set; }

    /// <summary>
    /// 打标时间
    /// </summary>
    [SugarColumn(ColumnName = "marking_time")]
    [DisplayName("打标时间")]
    public DateTime MarkingTime { get; set; }

    /// <summary>
    /// 每天产量计数。
    /// </summary>
    /// <remarks>表示此SN是当天第多少个生成的</remarks>
    [SugarColumn(ColumnName = "production_count_perday")]
    [DisplayName("产量计数")]
    public int? ProductionCountPerDay { get; set; }

    /// <summary>
    /// 数据创建时间
    /// </summary>
    [SugarColumn(ColumnName = "created_time")]
    public DateTime CreatedTime { get; set; }

    /// <summary>
    /// 数据更新时间
    /// </summary>
    [SugarColumn(ColumnName = "updated_time")]
    public DateTime? UpdatedTime { get; set; }
}
